<ion-header>
	<ion-navbar>

		<ion-title>欢迎使用系统</ion-title>
	</ion-navbar>
</ion-header>

<ion-content>
	<div class="logo">
		<img src="assets/img/appicon.svg" alt="Ionic logo">
	</div>

	<form #loginForm="ngForm" novalidate>
		<ion-list no-lines>
			<ion-item>
				<ion-label floating>帐号</ion-label>
				<ion-input [(ngModel)]="login.username" name="username" type="text" #username="ngModel" spellcheck="false" autocapitalize="off"
				 required>
				</ion-input>
			</ion-item>
			<p ion-text [hidden]="username.valid || submitted == false" color="danger" padding-left>
				请输入正确的用户名
			</p>

			<ion-item>
				<ion-label floating>密码</ion-label>
				<ion-input [(ngModel)]="login.password" name="password" type="password" #password="ngModel" required>
				</ion-input>
			</ion-item>
			<p ion-text [hidden]="password.valid || submitted == false" color="danger" padding-left>
				请输入您的密码
			</p>
		</ion-list>
		<p ion-text [hidden]="logincheck == true" color="danger" padding-left>
			用户名或密码错误
		</p>
		<ion-row responsive-sm>
			<ion-col>
				<button ion-button (click)="onLogin(loginForm)" type="submit" block>登录</button>
			</ion-col>
			<!--<ion-col>
				<button ion-button (click)="onSignup()" color="light" block>Signup</button>
			</ion-col>-->
		</ion-row>
	</form>

</ion-content>